﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DynaSpace.Entity;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace DynaSpace.SampleEntity
{
	/// <summary>
	/// Entita pro zobrazování terénu
	/// </summary>
	class GroundEntity : EntityBase,IRendeable, ICollision
	{
		public GroundEntity(Playground parent, Vector2 position)
			: base(parent, position)
		{
		}

		#region IRendeable Members

		public void Render(Microsoft.Xna.Framework.Vector2 rel, Microsoft.Xna.Framework.Graphics.SpriteBatch sb)
		{
			sb.Draw(SampleEntityComponent.texGround, (Position - rel) * SIZE,Color.White);
		}

		#endregion

		#region ICollision Members

		public bool CanCollide(EntityBase entity)
		{
			return true; // vždy vyvolává kolizi
		}

		#endregion
	}
}
